﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ModernUIApp1;

namespace ModernUIApp1.DataTier
{
    class MPHIEUMUON
    {
        public void TaoPhieuMuon(int madocgia, int soluong, string cacmasach)
        {
            PHIEUMUON pm = new PHIEUMUON() 
            { 
                MaDG = madocgia,
                SoLuong = soluong,
                NgayLapPhieu = System.DateTime.Now,
            };

            PHIEUMUONCHITIET pmct = new PHIEUMUONCHITIET();
            
            Global.db.PHIEUMUONs.InsertOnSubmit(pm);
            Global.db.SubmitChanges();
        }
    }
}
